import { functionCommon, requestCommon } from "@whzhuke/common"

export default {
  list: (params: any) => {
    return requestCommon.get<any>({
      url: `${functionCommon.requestHost("api")}/v1/m/message`,
      params
    })
  },//查询当前用户消息列表
  send: (params: any) => {
    return requestCommon.postJson<any>({
      url: `${functionCommon.requestHost("api")}/v1/m/send/message`,
      params
    })
  },//发送私信
  reply: (params: any) => {
    return requestCommon.postJson<any>({
      url: `${functionCommon.requestHost("api")}/v1/m/reply/message`,
      params
    })
  },//回复私信
  seen: (params: any) => {
    return requestCommon.put<any>({
      url: `${functionCommon.requestHost("api")}/v1/m/message/info`,
      params
    })
  },//将当前用户消息全部标记为已读

  item: (params: any) => {
    return requestCommon.get<any>({
      url: `${functionCommon.requestHost("api")}/v1/m/${params.id}/detail`
    })
  },//查询消息
  statistic: (params: any) => {
    return requestCommon.get<any>({
      url: `${functionCommon.requestHost("api")}/v1/m/message/${params.id}/statistic`
    })
  }// 查询收件人消息数量


}
